package com.tbgov.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 家庭成员
 * </p>
 *
 * @author 1st
 * @since 2024-11-19
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("family_member")
@Schema(name = "FamilyMember", description = "家庭成员")
public class FamilyMember implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "家庭成员主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @Schema(description = "关联家庭(family)主键id")
    private Long familyId;
    @Schema(description = "成员姓名")
    private String name;
    @Schema(description = "性别 0:未知 1:男 2:女 默认0")
    private Byte gender;
    @Schema(description = "个人照片")
    private String photo;
    @Schema(description = "户主关系 0:户主 1:配偶 2:子女 3:孙子女 4:父母 5:祖父母 6:外祖父母 7:兄弟 8:姐妹 9:旁系亲属")
    private Integer familyTies;
    @Schema(description = "身份证")
    private String idCard;
    @Schema(description = "生日")
    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
    private LocalDate birthday;
    @Schema(description = "联系方式")
    private String mobilePhone;
    @Schema(description = "技能特长描述")
    private String specialtyDesc;
    @Schema(description = "是否是党员 0:否 1:是 默认0")
    private Byte isPartyMember;
    @Schema(description = "入党时间")
    private LocalDate joinTime;
    @Schema(description = "是否加入村民理事会 0:否 1:是 默认0")
    private Byte isCouncilMembers;
    @Schema(description = "健康状况描述 默认 健康")
    private String healthDesc;
    @Schema(description = "是否纳入慢性病补助 0:否 1:是  默认是0")
    private Byte isChronicDiseaseBenefit;
    @Schema(description = "参保情况描述")
    private String insuredDesc;
    @Schema(description = "是否购买综治保险 0:否 1:50 2:100 3:150 默认0")
    private Byte comprehensiveInsurance;
    @Schema(description = "就业创业类型 0:就业 1:创业 2:临工 改为  0:无 1:自主创业 2:临时就业 3:在校学生 默认0")
    private Byte workType;
    @Schema(description = "工作单位|学校名称")
    private String workUnit;
    @Schema(description = "创业地点|工作地址|年级班级")
    private String workAddress;
    @Schema(description = "创业内容|工作职务|在校情况（小学，初中，高中，高职，大学，研究生，其他）")
    private String workContent;
    @Schema(description = "系统自动创建")
    private LocalDateTime createTime;
    @Schema(description = "系统自动修改")
    private LocalDateTime updateTime;

    @Schema(description = "脱贫信息集合")
    @TableField(exist = false)
    private List<FamilyMemberPoverty> povertyList;
    @Schema(description = "社会治理集合")
    @TableField(exist = false)
    private List<FamilyMemberGovernance> governanceList;
}
